#ifndef BM_EVENT_H
#define BM_EVENT_H

typedef enum EventType EventType;
typedef struct KeyEvent KeyEvent;
typedef struct MouseEvent MouseEvent;
typedef struct Event Event;

enum EventType
{
	K_CHARDOWN,
	K_KEYDOWN,
	K_KEYUP,
	M_BUTTONDOWN,
	M_BUTTONUP,
	M_SCROLL
};

struct KeyEvent
{
	int event_type;

	union 
	{
		unsigned char c;
		unsigned int k;
	}key;
};

struct MouseEvent
{
	int event_type;
	int x, y;
	int scroll;
};

struct Event
{
	int event_type;
	union
	{
		KeyEvent k;
		MouseEvent m;
	}e;
};




#endif